<?php
/**
 * Class XUser is object-reflection of table user in database
 * @author SQLObject2
 * @package SQLObject2
 */
class XUser extends SQLObject {

    /**
     * Get id
     * @return int
     */
    public function getId() { return $this->getField('id');}

    /**
     * Set id
     * @param int $id
     */
    public function setId($id) {$this->setField('id', $id);}

    /**
     * Get name
     * @return string
     */
    public function getName() { return $this->getField('name');}

    /**
     * Set name
     * @param string $name
     */
    public function setName($name) {$this->setField('name', $name);}

    /**
     * Get login
     * @return string
     */
    public function getLogin() { return $this->getField('login');}

    /**
     * Set login
     * @param string $login
     */
    public function setLogin($login) {$this->setField('login', $login);}

    /**
     * Get level
     * @return int
     */
    public function getLevel() { return $this->getField('level');}

    /**
     * Set level
     * @param int $level
     */
    public function setLevel($level) {$this->setField('level', $level);}

    /**
     * Get password
     * @return string
     */
    public function getPassword() { return $this->getField('password');}

    /**
     * Set password
     * @param string $password
     */
    public function setPassword($password) {$this->setField('password', $password);}

    /**
     * Get bday
     * @return string
     */
    public function getBday() { return $this->getField('bday');}

    /**
     * Set bday
     * @param string $bday
     */
    public function setBday($bday) {$this->setField('bday', $bday);}

    /**
     * Get cdate
     * @return string
     */
    public function getCdate() { return $this->getField('cdate');}

    /**
     * Set cdate
     * @param string $cdate
     */
    public function setCdate($cdate) {$this->setField('cdate', $cdate);}

    /**
     * Get adate
     * @return string
     */
    public function getAdate() { return $this->getField('adate');}

    /**
     * Set adate
     * @param string $adate
     */
    public function setAdate($adate) {$this->setField('adate', $adate);}

    /**
     * Get sdate
     * @return string
     */
    public function getSdate() { return $this->getField('sdate');}

    /**
     * Set sdate
     * @param string $sdate
     */
    public function setSdate($sdate) {$this->setField('sdate', $sdate);}

    /**
     * Get phone
     * @return string
     */
    public function getPhone() { return $this->getField('phone');}

    /**
     * Set phone
     * @param string $phone
     */
    public function setPhone($phone) {$this->setField('phone', $phone);}

    /**
     * Get email
     * @return string
     */
    public function getEmail() { return $this->getField('email');}

    /**
     * Set email
     * @param string $email
     */
    public function setEmail($email) {$this->setField('email', $email);}

    /**
     * Get image
     * @return string
     */
    public function getImage() { return $this->getField('image');}

    /**
     * Set image
     * @param string $image
     */
    public function setImage($image) {$this->setField('image', $image);}

    /**
     * Get ip
     * @return string
     */
    public function getIp() { return $this->getField('ip');}

    /**
     * Set ip
     * @param string $ip
     */
    public function setIp($ip) {$this->setField('ip', $ip);}

    /**
     * Get sid
     * @return string
     */
    public function getSid() { return $this->getField('sid');}

    /**
     * Set sid
     * @param string $sid
     */
    public function setSid($sid) {$this->setField('sid', $sid);}

    /**
     * Get sudoid
     * @return int
     */
    public function getSudoid() { return $this->getField('sudoid');}

    /**
     * Set sudoid
     * @param int $sudoid
     */
    public function setSudoid($sudoid) {$this->setField('sudoid', $sudoid);}

    /**
     * Create an object
     * @param int $id
     */
    public function __construct($id = 0) {
        $this->setTablename('user');
        $this->setFields(array('id', 'name', 'login', 'level', 'password', 'bday', 'cdate', 'adate', 'sdate', 'phone', 'email', 'image', 'ip', 'sid', 'sudoid'));
        $this->setClassname(__CLASS__);
        $this->setPrimaryKey('id');
        parent::__construct($id);
    }

    /**
     * @return XUser
     */
    public function getNext($exception = false) {return parent::getNext($exception); }

    /**
     * @return XUser
     */
    public static function Get($key) {return self::GetObject("XUser", $key);}

}
